package observerPattern.modify;

import java.util.ArrayList;
import java.util.Observable;

/**
 * @author： pang-yun
 * @date： 2021-10-26 10:04
 * 功能目的 ：用于
 */

public class Client {
    public static void main(String[] args) {
        WeatherData weatherData = new WeatherData();

        ArrayList<Observer> observers = new ArrayList<>();
        weatherData.setObservers(observers);

        CurrentConditions a = new CurrentConditions();
        GodObserver a1 = new GodObserver("A");

        weatherData.registerObserver(a);
        weatherData.registerObserver(a1);

        weatherData.setData(1f,2f,4f);

        System.out.println("---------------------");


    }
}
